//
//  CCKWebViewController.m
//  budejieMe
//
//  Created by 韦恺 on 16/8/27.
//  Copyright © 2016年 SuperJJ. All rights reserved.
//

#import "CCKWebViewController.h"

@interface CCKWebViewController ()

@end

@implementation CCKWebViewController

- (void)loadView
{
    self.view = [UIWebView new];
}

- (void)viewDidLoad {
    [super viewDidLoad];
    
    UIWebView *webView = (UIWebView *)self.view;
    
    NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:_urlStr]];
    
    [webView loadRequest:request];
    
    self.title = @"百思不得姐";
    
    [self.navigationController.navigationBar setTintColor:[UIColor blackColor]];
    
    [self setupNavigationBarLeftButton];
}

- (void)setupNavigationBarLeftButton
{
//    UIButton *leftButton = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 50, 36)];
//    [leftButton setImage:[UIImage imageNamed:@"navigationButtonReturn"] forState:UIControlStateNormal];
//    [leftButton setTitle:@"返回" forState:UIControlStateNormal];
//    leftButton.titleLabel.font = [UIFont systemFontOfSize:17];
//    
//    [leftButton setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
//    
//    [leftButton addTarget:self action:@selector(returnLastViewController) forControlEvents:UIControlEventTouchUpInside];
//    
//    self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:leftButton];

    
    
    
}

- (BOOL)hidesBottomBarWhenPushed
{
    return YES;
}

- (void)returnLastViewController
{
    self.tabBarController.tabBar.hidden = NO;
    [self.navigationController popViewControllerAnimated:YES];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
